home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
pcpilot.exe
/
lha
/
KBD.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-12-30
|
2KB
|
126 lines
; KBD.ASM - Compiled from KBD.C using TCC.EXE
;
; From the book "Systems Programming in Turbo C", by Michael J. Young
;
ifndef ??version
?debug macro
endm
endif
?debug S "kbd.c"
_TEXT segment byte public 'CODE'
DGROUP group _DATA,_BSS
assume cs:_TEXT,ds:DGROUP,ss:DGROUP
_TEXT ends
_DATA segment word public 'DATA'
d@ label byte
d@w label word
_DATA ends
_BSS segment word public 'BSS'
b@ label byte
b@w label word
?debug C E9E69A5212056B62642E63
?debug C E900101D1110423A5C494E434C5544455C646F732E68
?debug C E94CB2511210423A5C494E434C5544455C6B62642E68
_BSS ends
_TEXT segment byte public 'CODE'
?debug C E800056B62642E63E69A5212
?debug L 13
_KbdFlush proc near
?debug B
?debug B
@2:
?debug L 19
mov ah, 01
?debug L 20
int 16h
?debug L 21
jz @3
?debug L 23
mov ah, 00
?debug L 24
int 16h
?debug L 26
jmp @2
@3:
@1:
?debug L 28
ret
?debug E
?debug E
_KbdFlush endp
?debug L 31
_KbdGetShift proc near
?debug B
?debug B
?debug L 36
mov bx,64
mov es,bx
mov bx,23
mov ax,word ptr es:[bx]
jmp short @4
@4:
?debug L 37
ret
?debug E
?debug E
_KbdGetShift endp
?debug L 40
_KbdSetShift proc near
?debug B
push bp
mov bp,sp
?debug C E609536869667453746174040A0400
?debug B
?debug L 45
mov ax,word ptr [bp+4]
mov bx,64
mov es,bx
mov bx,23
mov word ptr es:[bx],ax
@5:
?debug L 46
pop bp
ret
?debug C E609536869667453746174040A0400
?debug E
?debug E
_KbdSetShift endp
?debug L 48
_KbdGetC proc near
?debug B
?debug B
?debug L 55
mov ah,0
?debug L 56
int 22
?debug L 57
jmp short @6
@6:
?debug L 58
ret
?debug E
?debug E
_KbdGetC endp
_TEXT ends
?debug C E9
_DATA segment word public 'DATA'
s@ label byte
_DATA ends
_TEXT segment byte public 'CODE'
_TEXT ends
public _KbdSetShift
public _KbdGetShift
public _KbdFlush
public _KbdGetC
?debug C EA0109
?debug C E31800000023010000
?debug C EC0C5F4B626453657453686966741818
?debug C E31900000023040000
?debug C EC0C5F4B626447657453686966741900
?debug C E31A00000023010000
?debug C EC095F4B6264466C7573681A00
?debug C E31B00000023040000
?debug C EC085F4B6264476574431B00
end